home *** CD-ROM | disk | FTP | other *** search
- MicroEMACS 3.8f Release Notes
-
- **********************************************************************
-
- (C)opyright 1987 by Daniel M. Lawrence
- MicroEMACS 3.8 can be copied and distributed freely for any
- non-commercial purposes. MicroEMACS 3.8 can only be incorporated
- into commercial software with the permission of the current author.
-
- ( Notice the copyright.....a number of large companies decided to use
- MicroEMACS 3.7 and 3.7i as the shell of their products, and several of
- the ones I contacted were not even courteos enough to send me their
- product for my personal use. I am not out to make a fortune on this,
- but a little common courtesy would be appreciated.)
-
- **********************************************************************
-
- It has been quite a while since the last realease and there are
- a large number of new features and enhancements to old features. There
- is now a full extension language and there is also support nearly
- completed for a number of newer 68000 machines. The edit history at the
- beginning of the MAIN.C file details the changes.
-
- MicroEMACS 3.8f is availible in a couple of different ways.
- First, it is availible via my bulletin board system.....
-
- The Programmer's Room
- FIDO 201/2
- (317) 742-5533
- 24 hours 300/1200 baud
-
- Also it should be online on the following BBS's:
-
- The Starship Trooper Fido 201/1 (317) 423-2281 2400
- Duncan Communications (317) 567-2143 2400
- Avatar Fido 201/4 (317) 497-1970 1200
-
- There it is arranged as three MSDOS .ARC files, EMACSDOC.ARC
- which contains the documentation and command files, EMACSSRC.ARC which
- contains the sources and the UNIX Makefile, and EMACSEXE.EXE which
- contains the MSDOS executables. Also all the various executables are
- availibile individualy. (On Duncan Communications, only the sources and
- documents are present, as 12 shar files).
-
- EMACSDOC.ARC includes the files:
-
- README This file
-
- EMACS.RC Standard startup file
- ME110.RC HP110 startup file
- ME150.RC HP150 startup file
-
-
- EMACS.HLP Online help file
- EMACS.KEY Cammond wallchart
- EMACS.TUT Online tutorial
- EMACS.MSS Emacs Introduction document
- EMACS1.MSS Emacs Reference guide
- IBMFN.LST IBM-PC function list
- MAGIC.DOC Regular partern matching bulletin
-
- AZMAP.CMD Translate .SYM files to .MAP
- BDATA.CMD BASIS Data statement builder
- MENU.CMD Sample Menu system
- MENU1 datafile for menu syste
-
- EMACSSRC.ARC includes the files:
-
- ANSI.C ANSI screen driver
- BASIC.C basic cursor movement
- BIND.C key binding commands
- BUFFER.C buffer manipulation commands
- CRYPT.C encryption functions
- DG10.C Data General 10 screen driver
- DISPLAY.C main display driver
- EBIND.H binding list
- EDEF.H global variable declarations
- EFUNC.H function name list
- EGAPC.C EGA screen driver
- EPATH.H default path settings
- ESEARCH.H search global declarations
- ESTRUCT.H configuration and structure definitions
- EVAL.C expresion evaluator
- EVAR.H EMACS macro variable declarations
- EXEC.C macro execution functions
- FILE.C user file functions
- FILEIO.C low level file I/O driver
- HP110.C HP110 screen driver
- HP150.C HP150(A or C) screen driver
- IBMPC.C IBM-PC CGA and MONOCHROME driver
- INPUT.C low level user input driver
- ISEARCH.C incremental search functions
- LINE.C text line manipulation functions
- LOCK.C file locking functions
- MAIN.C argument parsing and command loop
- RANDOM.C other random user functions
- REGION.C region cut & paste functions
- SEARCH.C search and replace functions
- SPAWN.C OS interface driver
- ST520.C ATARI ST1040 screen driver [not verified]
- TCAP.C Termcap screen driver
- TERMIO.C low level I/O driver
- TIPC.C TI-PC screen driver
- VMSVT.C VMS screen driver
- VT52.C VT52 screen driver
- WINDOW.C window manipulation functions
- WORD.C word manipulation functions
-
- EMACSEXE.ARC includes the files:
-
- MEIBM.EXE IBM-PC CGA and MONO version
- MEEGA.EXE IBM-PC EGA version
- MEANSI.EXE MSDOS ANSI graphics version
- ME110.EXE HP110 portable version
- ME150.EX HP150 version
- ME520.PRG Atari 520/1040ST version
-
- Also MicroEMACS should be availible from USENET via the
- mod.sources (aka comp.unix.sources) notegroup, or its archives. A
- number of sites also make MicroEMACS availible via FTP. Watch USENET
- news for info on these.
-
- MicroSCRIBE 1.0, which I had hoped to have ready by now, is only
- about half written. MicroEMACS took up more of my time in updates (and
- mailings) then I had expected, however having this fairly advanced, and
- hopefully fairly stable version, I can get back to getting MicroSCRIBE
- written. Also in the works for a later release is a spell checker
- (called MicroSPELL rather predictably) and sometime next year, a
- integrated thesaurus program.
-
- A more customized MicroEMACS for the Macintosh and the Amiga
- will probably become availible in the next couple of months. Support
- for the mouse, standard file boxes, pull down menus and different
- resolutions will be included. If you can be of help in getting this
- ready, please contact me.
-
- As before, I will continue to support these programs, and
- encourage everyone to spread them around as much as they can. If you
- make what you think are changes that are usefull to many, send me the
- updates, and as time permits, I will encorporate the ones I understand,
- and agree with into the master sources. Being overswamped with mailers,
- I have discontinued my mailing offer, but if you have a special problem
- getting hold of MicroEMACS, contact me and we can work something out for
- you.
-
- USmail: Daniel Lawrence
- 617 New York St
- Lafayette, IN 47901
-
- UUCP: ihnp4!pur-ee!pur-phy!duncan!lawrence
- or ihnp4!itivax!duncan!lawrence
- ARPA: nwd@j.cc.purdue.edu
- FIDO: The Programmer's Room 201/2
- (317) 742-5533
- ATT: (317) 742-5153
-
-
-
-
- New Features
- ============
-
- *** Path Searching
-
- If the OS of the operating system MicroEMACS is running under
- has environmental variables, MicroEMACS will read in the PATH variable
- as a list of directories in which to look for its startup and help
- files, in place of the list in the epath.h file.
-
- *** Bindable Prefixes
-
- All the prefix keys can now be rebound. This includes:
-
- meta-prefix <ESC>
- ctlx-prefix ^X
- universal-argument ^U
- quote-character ^Q
-
- *** HP150 function keys
-
- can now both be labeled and bound.
-
- *** New Help Function
-
- The APROPOS (M-A) function prompts for a string, and then
- prepares a list of all named functions that contain the string. This is
- usefull for finding all comands that deal with one topic.
-
- *** File Encryption
-
- Text files can now be encrypted (and decrypted <very useful>).
- The encryption method (written by Dana Hoggat) results in ALL legal
- printing characters, leaving files suitable for mailing and moving
- around between systems. The -k <encryption key> command line switch
- places the first file into the edit buffer using the named key. CRYPT is
- a mode which can be set on any buffer, and set-encryption-key (M-E) sets
- the encryption key of the current buffer. If you attempt to write out a
- buffer in crypt mode without specifying the key, MicroEMACS will
- automatically prompt you for it.
-
- *** Keyboard Macros rewritten
-
- The code for processing keyboard macros now records the responses
- to all prompts as well as just the command keystrokes.
-
- *** Restrictive Mode
-
- The -r command line switch prevents EMACS from executing many of
- its commands which would allow you to break out of it, or edit files
- other then the ones named on the command line. This is usefull for
- products that need to restrict access to the OS from inside the editor
- (for example, BBS systems).
-
- *** Word wrap made more flexible
-
- When emacs determined it is time to word wrap (when in wrap
- mode) it calls the function which is bound to the illegal keystroke,
- M-FNW. This keystroke is normally bound to wrap-word (M-FNW), but can be
- rebound by the user so EMACS can do different things at wrap time (like
- auto indention in different languages).
-
- *** Fence Matching
-
- The goto-matching-fence (M-^F) command jumps the cursor to the
- matching fence, or beeps if there is none.
-
- *** Dynamic Screen Re-sizing
-
- The size that EMACS uses for editing can be changed with the
- change-screen-size (M-^S) and change-screen-width (M-^T) commands. These
- can then be usefull in integrating EMACS on window based machines.
-
- *** IBMPC drivers combined...
-
- The IBM-PC CGA and MONOCHROME drivers have been combined into
- one driver which will look up the graphics adapter type at startup and
- adjust accordingly.
-
- *** Atari 520/1040ST Support added
-
- The Atari 520/1040ST is now supported in both monochome and
- color modes. Both low and medium resolution can be used with the color
- monitor. DENSE mode (40 line) is not ready for the monochrome monitor at
- the time of this version. Also shelling out for commands is not ready.
-
- *** EXTENTION LANGUAGE
-
- MicroEMACS is now equipped with a fully functional extention
- language in which to write macros. These macros can be saved, recalled
- and bound to keystrokes, thus allowing a high degree of customization.
- What follows is an exerpt from what will become the new MicroEMACS
- reference manual.
-
- Chapter x: MicroEMACS Macros
-
- Macros are programs that are used to customize the editor and to
- perform complicated editing tasks. They may be stored in files or
- buffers and may be executed using an appropriate command, or bound to a
- particular keystroke. Portions of the standard start-up file are
- impliment via macros, as well as the example menu system. The
- execute-macro-<n> editor commands cause the macros, numbered from 1 to
- 40, to be executed. Macros are stored by executing files that contain
- the store-macro command.
-
- There are many different aspects to the macro langage within
- MicroEMACS. Editor commands are the various commands that manipulate
- text, buffers, windows, etc, within the editor. Directives are commands
- which control what lines get executed within a macro. Also there are
- various types of variables. Environmental variables both control and
- report on different aspects of the editor. User variables hold string
- values which may be changed and inspected. Buffer variables allow text
- to be placed into variables. Interactive variable allow the program to
- prompt the user for information. Functions can be used to manipulate
- all these variables.
-
- x.00 Variables
-
- Variables in MicroEMACS can be used to return values within
- expressions, as repeat counts to editing commands, or as text to be
- inserted into buffers and messages. The value of these variables is set
- using the set (^X-A) command. For example, to set the current fill
- column to 64 characters, the following macro line would be used:
-
- set $fillcol 64
-
- or to have the contents of %NAME inserted at the point in the
- current buffer, the command to use would be:
-
- insert-string %name
-
-
- x.01 Environmental Variables
-
- "What good is a quote if you can't change it?"
-
- These variables are used to change different aspects of the way
- the editor works. Also they will return the current settings if used as
- part of an expresion. All environmental variable names begin with a
- dollar sign ($).
-
- $fillcol Current fill column
- $pagelen Number of screen lines used currently
- $curwidth Number of columns used currently
- $curcol Current column of point in current buffer
- $curline Current line of point in current buffer
- $flicker Flicker Flag
- set to TRUE if IBM CGA
- set to FALSE for most others
- $cbufname Name of the current buffer
- $cfname File name of the current buffer
- $sres Current screen resolution
- (CGA or MONO on the IBM-PC driver...
- EGA on the EGA driver
- LOW MEDIUM or HIGH on the Atari ST1040
- NORMAL on all others)
- $debug Flag to trigger macro debugging (try it...
- you'll like it!)
- $status return status of the success of the last command
- (TRUE or FALSE) usually used with !force
- $palette string used to control the palette register
- settings on graphics versions. The usually form
- consists of groups of three octal digits
- setting the red, green, and blue levels.
-
- Obviously, many more of these variables will be availible in
- future releases of MicroEMACS. (Yes, send a vote for your favorite new
- environmental variables today).
-
- x.02 User variables
-
- User variables allow you, the user, to store strings and
- manipulate them. These strings can be pieces of text, numbers (in text
- form), or the logical values TRUE and FALSE. These variables can be
- combined, tested, inserted into buffers, and otherwise used to control
- the way your macros execute. At the moment, up to 100 user variables may
- be in use in one editing session. All users variable names must begin
- with a percent sign (%) and may contain any printing characters. Only
- the first 10 characters are significant (ie differences beyond the tenth
- character are ignored). Most operators will truncate strings to a length
- of 128 characters.
-
- x.03 Buffer Variables
-
- Buffer variables are special in that they can only be queried
- and cannot be set. What buffer variables are is a way to take text from
- a buffer and place it in a variable. For example, if I have a buffer by
- the name of RIGEL2, and it contains the text:
-
- Richmond
- Lafayette
- <*>Bloomington (where <*> is the current point)
- Indianapolis
- Gary
- =* MicroEMACS 3.8f (WRAP) == rigel2 == File: /data/rigel2.txt =====
-
- and within a command I reference #rigel2, like:
-
- insert-string #rigel2
-
- MicroEMACS would start at the current point in the RIGEL2
- buffer and grab all the text up to the end of that line and pass that
- back. Then it would advance the point to the beginning of the next line.
- Thus, after our last command executes, the string "Bloomington" gets
- inserted into the current buffer, and the buffer RIGEL2 now looks like
- this:
-
- Richmond
- Lafayette
- Bloomington
- <*>Indianapolis (where <*> is the current point)
- Gary
- =* MicroEMACS 3.8f (WRAP) == rigel2 == File: /data/rigel2.txt =====
-
- as you have probably noticed, a buffer variable consists of the
- buffer name, preceded by a pound sign (#).
-
- x.04 Interactive variables
-
- Interactive variables are actually a method to prompt the user
- for a string. This is done by using an at sign (@) followed either with
- a quoted string, or a variable containing a string. The string is the
- placed on the bottom line, and the editor waits for the user to type in
- a string. Then the string typed in by the users is returned as the
- value of the interactive variable. For example:
-
- set %quest "What file? "
- find-file @%quest
-
- will ask the user for a file name, and then attempt to find it.
-
-
- x.10 Functions
-
- Functions can be used to manipulate variables in various ways.
- Functions can have one, two, or three arguments. These arguments will
- always be placed after the function on the current command line. For
- example, if we wanted to increase the current fill column by two, using
- emacs's set (^X-A) command, we would write:
-
- set $fillcol &add $fillcol 2
- \ \ \ \ \____second operand
- \ \ \ \________first operand
- \ \ \_____________function to execute
- \ \__________________variable to set
- \_______________________set (^X-A) command
-
- Function names always begin with the ampresand (&) character,
- and are only significant to the first three characters after the
- ampresand. Functions will normal expect one of three types of
- arguments, and will automatically convert types when needed.
-
- <num> an ascii string of digits which is interpeted as a
- numeric value. Any string which does not start with a
- digit or a minus sign (-) will be considered zero.
-
- <str> An arbitrary string of characters. At the moment,
- strings are limited to 128 characters in length.
-
- <log> A logical value consisting of the string "TRUE" or
- "FALSE". Numeric strings will also evaluate to "FALSE"
- if they are equal to zero, and "TRUE" if they are
- non-zero. Arbitrary text strings will have the value of
- "FALSE".
-
- A list of the currently availible functions follows: (Once
- again, send in those votes on what kind of functions you would like to
- see added!)
-
- Numeric Functions: (returns <num>)
-
- &ADD <num> <num> Add two numbers
- &SUB <num> <num> Subtract the second number from the first
- &TIMes <num> <num> Multiply two numbers
- &DIVide <num> <num> Divide the first number by the second
- giving an integer result
- &MOD <num> <num> Return the reminder of dividing the
- first number by the second
- &NEGate <neg> Multiply the arg by -1
-
-
- String manipulation functions: (returns <str>)
-
- &CAT <str> <str> Concatinate the two strings to form one
- &LEFt <str> <num> return the <num> leftmost characters
- from <str>
- &RIGht <str> <num> return the <num> rightmost characters
- from <str>
- &MID <str> <num1> <num2>
- Starting from <num1> position in <str>,
- return <num2> characters.
-
- Logical Testing functions: (returns <log>)
-
- &NOT <log> Return the opposite logical value
- &EQUal <num> <num> If <num> and <num> are numerically
- equal, return TRUE
- &LESs <num1> <num2> If <num1> is less than <num2>, return
- TRUE.
- &GREater <num1> <num2> If <num1> is greater than, or equal to
- <num2>, return TRUE.
- &SEQual <str1> <str2> If the two strings are the same, return
- TRUE.
- &SLEss <str1> <str2> If <str1> is less alphabetically than
- <str2>, return TRUE.
- &SGReater <str1> <str2> If <str1> is alphabetically greater than
- or equal to <str2>, return TRUE.
-
- Special Functions:
-
- &INDirect <str> Evaluate <str> as a variable.
-
- This last function deserves more explaination. The &IND function
- evaluates its argument, takes the resulting string, and then uses it as
- a variable name. For example, given the following code sequence:
-
- ; set up reference table
-
- set %one "elephant"
- set %two "giraffe"
- set %three "donkey"
-
- set %index "two"
- insert-string &ind %index
-
- the string "giraffe" would have been inserted at the point in
- the current buffer. This indirection can be safely nested up to about
- 10 levels.
-
- x.20 Directives
-
- Directives are commands which only operate within an executing
- macro, ie they do not make sense as a single command. As such, they
- cannot be called up singly or bound to keystroke. Used within macros,
- they control what lines are executed and in what order.
-
- Directives always start with the exlaimation mark (!) character
- and must be the first thing placed on a line. Directives executed singly
- (via the execute-command-line command) interactively will be ignored.
-
- x.21 !ENDM Directive
-
- This directive is used to terminate a macro being stored. For
- example, if a file is being executed contains the text:
-
- ; Read in a file in view mode, and make the window red
- 26 store-macro
- find-file @"File to view: "
- add-mode "view"
- add-mode "red"
- !endm
-
- write-message "[Consult macro has been loaded]"
-
- only the lines between the store-macro command and the !ENDM
- directive are stored in macro 26.
-
- x.22 !FORCE Directive
-
- When MicroEMACS executes a macro, if any command fails, the
- macro is terminated at that point. If a line is preceeded by a !FORCE
- directive, execution continues weather the command succeeds or not. For
- example:
-
- ; Merge the top two windows
-
- save-window ;remember what window we are at
- 1 next-window ;go to the top window
- delete-window ;merge it with the second window
- !force restore-window ;This will continue irregardless
- add-mode "red"
-
- x.23 !IF, !ELSE, and !ENDIF Directives
-
- This directive allows statements only to be executed if a
- condition specified in the directive is met. Every line following the
- !IF directive, until the first !ELSE or !ENDIF directive, is only
- executed if the expresion following the !IF directive evaluates to a
- TRUE value. For example, the following macro segment creates the
- portion of a text file automatically. (yes believe me, this will be
- easier to understand then that last explaination....)
-
- !if &sequal %curplace "timespace vortex"
- insert-string "First, rematerialize~n"
- !endif
- !if &sequal %planet "earth" ;If we have landed on earth...
- !if &sequal %time "late 20th century" ;and we are then
- write-message "Contact U.N.I.T."
- !else
- insert-string "Investigate the situation....~n"
- insert-string "(SAY 'stay here Sara')~n"
- !endif
- !else
- set %conditions @"Atmosphere conditions outside? "
- !if &sequal %conditions "safe"
- insert-string &cat "Go outside......" "~n"
- insert-string "lock the door~n"
- !else
- insert-string "Dematerialize..try somewhen else"
- newline
- !endif
- !endif
-
- x.24 !GOTO Directive
-
- Flow can be controlled within a MicroEMACS macro using the !GOTO
- directive. It takes as an argument a label. A label consists of a line
- starting with an asterick (*) and then an alphanumeric label. Only
- labels in the currently executing macro can be jumped to, and trying to
- jump to a non-existing label terminates execution of a macro. For
- example..
-
- ;Create a block of DATA statements for a BASIC program
-
- insert-string "1000 DATA "
- set %linenum 1000
-
- *nxtin
- update-screen ;make sure we see the changes
- set %data @"Next number: "
- !if &equal %data 0
- !goto finish
- !endif
-
- !if &greater $curcol 60
- 2 delete-previous-character
- newline
- set %linenum &add %linenum 10
- insert-string &cat %linenum " DATA "
- !endif
-
- insert-string &cat %data ", "
- !goto nxtin
-
- *finish
-
- 2 delete-previous-character
- newline
-
- x.25 !RETURN Directive
-
- The !RETURN Directive causes the current macro to exit, either
- returning to the caller (if any) or to interactive mode. For example:
-
- ; Check the monitor type and set %mtyp
-
- !if &sres "CGA"
- set %mtyp 1
- !return
- !else
- set %mtyp 2
- !endif
-
- insert-string "You are on a MONOCHROME machine!~n"
-
- <<<END OF MANUAL EXCERPT>>>
-